package abc.${packageName};

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;

<#if supportNacos?? && supportNacos!>
@LoadBalancerClient(value = "${application!}")
@EnableDiscoveryClient
<#else>
@LoadBalancerClient(value = "${application!}")
@EnableDiscoveryClient
</#if>
@SpringBootApplication(scanBasePackages = {"abc.*"})
@MapperScan(value = {"abc.${packageName}.*.mapper"})
@EnableFeignClients(basePackages = {"abc.${packageName}.*.client"})
public class ServiceAbcApplication {

    public static void main(String[] args) {
        run(null, args);
    }

    public static void run(Class clazz, String[] args) {
        SpringApplication app = new SpringApplication(ServiceAbcApplication.class);

        if(clazz == null) {
            app.run(args);
        }

        else {
            app.run(clazz, args);
        }
    }
}
